//
// Author: Vladimir Migashko <migashko@gmail.com>, (C) 2011
//
// Copyright: See COPYING file that comes with this distribution
//
#ifndef HITLIST_HIT_JSON_HPP
#define HITLIST_HIT_JSON_HPP

#include <fas/misc/json.hpp>
#include <fas/misc/command/basic_command.hpp>

#include "names.hpp"
#include "hit.hpp"

namespace aj = ::fas::json;
namespace ap = ::fas::pattern;

/** @typedef json-сериалиатор для hit */
typedef
  aj::object<
    hit,
    ap::type_list_n<
      aj::member<n_firstId, hit, user_id_t  , &hit::first_id>,
      aj::member<n_secondId, hit,user_id_t  , &hit::second_id>/*,
      aj::member<n_timeStamp, hit, time_t, &hit::hit_time>*/
    >::type
  > hit_json;

/** @typedef json-сериалиатор для hit с сокращенными именами  */
typedef
  aj::object<
    hit,
    ap::type_list_n<
      aj::member<n_f, hit, user_id_t  , &hit::first_id>,
      aj::member<n_s, hit, user_id_t  , &hit::second_id>,
      aj::member<n_h, hit, time_t, &hit::hit_time>
    >::type
  > hit_json_backup;

#endif

